-- GENERATED SPELL FOR [Rustblood] --


function spell0_27717(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42746,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27717', 640, 1)
end

function spell1_27717(pUnit, Event) --@Head Smash,n/a--
pUnit:FullCastSpellOnTarget(14102,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27717', 2319, 1)
end

function spell2_27717(pUnit, Event) --@Knockback,Self--
pUnit:FullCastSpellOnTarget(49398,pUnit)
pUnit:RegisterEvent('Sorts_27717', 623, 1)
end

function spell3_27717(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(61893,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27717', 2000, 1)
end

function Sorts_27717(pUnit, Event)
local choix_sorts_27717 = math.random(0, 3)
if choix_sorts_27717 == 0 then
pUnit:RegisterEvent('spell0_27717', 1, 1)
end
if choix_sorts_27717 == 1 then
pUnit:RegisterEvent('spell1_27717', 1, 1)
end
if choix_sorts_27717 == 2 then
pUnit:RegisterEvent('spell2_27717', 1, 1)
end
if choix_sorts_27717 == 3 then
pUnit:RegisterEvent('spell3_27717', 1, 1)
end
end

function mob27717_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27717', math.random(1500, 3000), 1)
end

function mob27717_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27717_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27717_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27717, 1, 'mob27717_Action')
RegisterUnitEvent(27717, 2, 'mob27717_Leave')
RegisterUnitEvent(27717, 3, 'mob27717_Kill')
RegisterUnitEvent(27717, 4, 'mob27717_Die')
